package br.ita.model.dao;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

public class JPAUtil {
    public EntityManagerFactory emf;
    public EntityManager getEntityManager(){
        if(emf == null){
            emf = Persistence.createEntityManagerFactory("com.mycompany_netSaleMaven_war_1.0-SNAPSHOTPU");
        }
        return emf.createEntityManager();
    }
}
